<template>
	<!-- 登陆页 -->
	<!-- <van-popup v-model="show" position="right" :overlay="false">
		<div class="LayerThickness">
			<div class="LayerClose">
				<img :src="closeImg" class="rulesBox_titleImg"  @click="closeoverlay()"/>
				<span>登陆</span>
			</div>
			<div class="LayerLogin">
				<form action="" class="login-from">
					<p>
						<input type="text" placeholder=" 请输入用户名" name="loginName" v-model="loginName" class="login-name"/>
					</p>
					<p>
						<input type="password" placeholder=" 请输入密码" name="password" v-model="password" class="login-pass"/>
					</p>
					<p>
						<button type="button" class="login-button" @click="sendLogin()">登录</button>
					</p>
					<p class="forgetDiv">
						<span>忘记密码</span>
						<span>注册账号</span>
					</p>
				</form>
			</div>
			
		</div>
	</van-popup> -->
	<div class="loginBox">
		<div class="loginBox_title">
			<span>{{login}}</span>
		</div>
		<div class="LayerLogin">
			<form action="" class="login-from">
				<p>
					<input type="text" placeholder=" 请输入用户名" name="loginName" v-model="loginName" class="login-name"/>
				</p>
				<p>
					<input type="password" placeholder=" 请输入密码" name="password" v-model="password" class="login-pass"/>
				</p>
				<p>
					<button type="button" class="login-button" @click="sendLogin()">登录</button>
				</p>
				<p class="forgetDiv">
					<span>忘记密码</span>
					<span>注册账号</span>
				</p>
			</form>
		</div>
		
	</div>
</template>

<script>
	export default {
		data() {
			return {
				loginName:'',
				password:'',
				login:'登录'
			};
		},
		components: {
		},
		methods: {
			// 点击登陆时判断是否为空，如果都不为空的话就进行ajax请求把信息传给后台，把拿到的信息存储到本地，然后天赚到首页
			
			// 进入未登录页面的时候要执行一个js首先判断本地存储中是否有用户信息，没有就跳到登录页，如果有就直接把信息拿出来填在页面上
			sendLogin:function(){
				if(this.loginName==''){
					alert('请输入用户名')
				}else if(this.password==''){
					alert('请输入密码')
				}else{
					alert('登陆成功')
				}
			}
		},
		mounted() {
		},
		computed: {

		}
	};
</script>
<style scoped lang="scss">
	@import "@/asserts/styles/login/login.scss";
</style>
